package org.opens.mybatisplus.entity.enumObj3;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

@Data
@TableName(value = "enum_obj3")
public class EnumObj3 {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "name")
    private String name;

    @TableField(value = "sex")
    // json反序列化转换
    @JsonDeserialize(converter = EnumObj3JsonConvter.class)
    // 序列化json转换
    @JsonSerialize(using = EnumObj3JsonSerialize.class)
    private EnumObj3Sex sex;

}
